Skip to content

Conversation

@Aniketsy
Copy link
Contributor

@Aniketsy Aniketsy commented Oct 14, 2025

Please let me know if my approach or fix needs any improvements . I’m open to feedback and happy to make changes based on suggestions.
Thank you !

@Aniketsy
Copy link
Contributor Author

@MarcoGorelli please review these changes when you get chance.

@Aniketsy
Copy link
Contributor Author

@jbrockmendel please review these changes when you get chance.

values = np.asarray(original, dtype=dtype)
else:
values = np.asarray(original, dtype="object")
if not (pd.isna(values[idx]) or pd.isna(original[idx])):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check this without pd.isna? we try to avoid importing pd in files that are "high up" in the dependency hierarchy

else:
dtype = dtype.numpy_dtype

if is_integer_dtype(dtype) and values.dtype.kind == "f" and len(values) > 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the fundamental issue is that when we get here we are implicitly assuming that values is an ndarray, while in this case it is a Series. If we called extract_array at the top of this function, then we would go through the if isinstance(values, cls): branch on L159, right?

@Aniketsy
Copy link
Contributor Author

Aniketsy commented Nov 4, 2025

I apologize for not replying earlier, I was in the hospital. I’ll continue working on this in the next 2–3 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: "boolean value of NA is ambiguous" when doing iloc on nullable integer series

2 participants